﻿<UserControl x:Class="TemplateGenerator.Controls.GenerateTemplateControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <ItemsControl x:Name="TemplateView" ItemsSource="{Binding}">
        <ItemsControl.ItemsPanel>
            <ItemsPanelTemplate>
                <WrapPanel Orientation="Horizontal" ScrollViewer.VerticalScrollBarVisibility="Visible" />
            </ItemsPanelTemplate>
        </ItemsControl.ItemsPanel>
        <ItemsControl.ItemTemplate>
            <DataTemplate>
                <Button Click="ButtonClick" Width="100">
                    <Button.Content>
                        <Border>
                            <StackPanel>
                                <Image Source="/TemplateGenerator;component/Resources/wordStandard.png" Stretch="None" />
                                <TextBlock Text="{Binding Name}" />
                            </StackPanel>
                        </Border>
                    </Button.Content>
                </Button>
            </DataTemplate>
        </ItemsControl.ItemTemplate>
    </ItemsControl>
</UserControl>
